package is.api.demo.rest.core;


import java.util.Map;

/**
 * 响应主体
 *
 * @author wei.tang
 */
public class HttpResponseBody {

    //接口处理成功或失败标识(success、fail)
    private String status = "success";
    // 提示信息
    private String message = "成功";
    // 其他信息
    private Object result = null;
    // 其他参数
    private Map<String, Object> attributes;

    public Map<String, Object> getAttributes() {
        return attributes;
    }

    public void setAttributes(Map<String, Object> attributes) {
        this.attributes = attributes;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public boolean isSuccess() {
        return status.equals("success");
    }
}
